export default {
  name: '呼吸气泡层',
  code: 'custom_map_group_bubble',
  version: '1.0.0',
  config: [
    {
      name: '默认配置',
      code: 'default',
      children: [
        {
          name: '气泡类型',
          code: 'type',
          value: 'type3',
          type: 'Radio',
          enumValue: [
            { key: '实心', value: 'type1' },
            { key: '空心', value: 'type2' },
            { key: '圈点', value: 'type3' },
          ],
        },
        {
          name: '气泡颜色',
          code: 'color',
          type: 'ColorSelector',
          value: '#F7B500',
        },
        {
          name: '最小值',
          code: 'minSize',
          type: 'InputNumber',
          value: 15,
          min: 1,
          max: 100,
        },
        {
          name: '最大值',
          code: 'maxSize',
          type: 'InputNumber',
          value: 30,
          min: 1,
          max: 100,
        },
      ],
    },
    {
      name: '提示框设置',
      code: 'tooltip',
      children: [
        {
          code: 'show',
          value: 'hide',
          type: 'Radio',
          enumValue: [
            {
              key: '无提示',
              value: 'hide',
            },
            {
              key: '提示一直存在',
              value: 'always',
            },
            {
              key: '鼠标划过提示',
              value: 'hover',
            },
            {
              key: '点击提示',
              value: 'click',
            },
          ],
        },
        {
          name: '文本设置',
          code: 'font',
          type: 'FontGroup',
          value: {
            fontSize: 14,
            fontFamily: 'siyuan',
            color: '#000',
            fontWeight: 'bold',
          },
        },
        {
          name: '边框粗细',
          code: 'borderWidth',
          min: 0,
          value: 3,
          type: 'InputNumber',
          unit: 'px',
        },
        {
          name: '边框颜色',
          code: 'borderColor',
          value: '#3399CC',
          type: 'ColorSelector',
        },
        {
          name: '背景来源',
          code: 'background',
          type: 'ChangeConfig',
          value: {
            type: 'color',
            backgroundColor: '#369',
            imageUrl: '',
          },
          enumValue: [
            {
              key: '颜色背景',
              value: 'color',
              change: [
                {
                  name: '背景颜色设置',
                  code: 'backgroundColor',
                  type: 'ColorSelector',
                },
              ],
            },
            {
              key: '图片背景',
              value: 'image',
              change: [
                {
                  name: '背景图片地址',
                  code: 'imageUrl',
                  type: 'ImgUpdate',
                },
              ],
            },
          ],
        },
      ],
    },
  ],
  data: {
    field: [
      { name: 'lng', mapper: 'lng' },
      { name: 'lat', mapper: 'lat' },
      { name: 'value', mapper: 'count' },
      { name: 'tooltip', mapper: 'tooltip', optional: true },
      { name: 'info', mapper: 'info', optional: true },
    ],
    type: 1,
    value: JSON.stringify([
      {
        lat: 30.395141,
        lng: 104.180187,
        count: 87,
        tooltip: '文字信息对应数据tooltip;可用分号换行',
      },
      { lat: 31.314268, lng: 113.033458, count: 58 },
      { lat: 32.517994, lng: 112.050051, count: 51 },
      { lat: 33.509955, lng: 115.07636, count: 36 },
      { lat: 34.308593, lng: 116.033371, count: 71 },
      { lat: 35.698055, lng: 103.81029, count: 29 },
      { lat: 36.443159, lng: 117.052512, count: 12 },
      { lat: 37.512241, lng: 104.069421, count: 21 },
      { lat: 38.513178, lng: 118.059847, count: 47 },
      { lat: 39.755745, lng: 103.783377, count: 77 },
      { lat: 39.395141, lng: 108.180187, count: 41 },
      { lat: 31.314268, lng: 103.033458, count: 68 },
      { lat: 30.509955, lng: 107.07636, count: 55 },
      { lat: 30.308593, lng: 120.033371, count: 93 },
      { lat: 39.698055, lng: 101.81029, count: 55 },
      { lat: 34.443159, lng: 105.052512, count: 59 },
      { lat: 31.512241, lng: 106.069421, count: 41 },
      { lat: 31.513178, lng: 105.059847, count: 78 },
      { lat: 35.755745, lng: 108.783377, count: 45 },
    ]),
  },
  events: {
    click: {
      description: '气泡点击响应事件',
      fields: {
        lng: {
          mapper: '',
          description: '经度',
          value: '',
        },
        lat: {
          mapper: '',
          description: '纬度',
          value: '',
        },
        info: {
          mapper: '',
          description: 'info字段',
          value: '',
        },
      },
      action: {
        active: false,
        useDefault: false,
        default: {
          lng: '',
          lat: '',
          info: '',
        },
      },
    },
  },
};
